package xyz.showbooks.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.dfm.pojo.Vip;
import xyz.dfm.util.JsonResult;
import xyz.dfm.vo.PageResult;
import xyz.showbooks.mapper.VipMapper;
import xyz.showbooks.service.VipService;

import java.util.List;

/**
 * @author: Dsi
 * @date: 2022/2/18 15:36
 * @description:
 */
@Service
public class VipServiceImpl implements VipService {
    @Autowired
    private VipMapper vipMapper;

    @Override
    public Vip findVipByUserId(String id) {
//        Integer pageSize = pageResult.getPageSize();
//        String query = pageResult.getQuery();
//        Integer start =(pageResult.getPageNum()-1)*pageSize;
//        List<Vip> vipByUserId = vipMapper.findVipByUserId(query, start, pageSize);
//        return pageResult.setRows(vipByUserId);
        return null;
    }

    @Override
    public void updateVipStatus(Vip vip) {
        vipMapper.updateVip(vip);
    }

    @Override
    public Vip findId(Integer userId) {
        return vipMapper.selectId(userId);
    }
}
